Skip to content

Conversation

@claudio-pi
Copy link
Collaborator

@claudio-pi claudio-pi commented Feb 10, 2026

Summary

  • Removed _check_orphan_processes() function (~70 lines) from health-check.sh
  • Removed its invocation in the healthy-service code path
  • Removed the orphan check test from health-check.bats

Why

The orphan process killer is no longer needed:

  • Subagents now run as native Claude Task tools (not background processes)
  • CLAUDE_CODE_DISABLE_BACKGROUND_TASKS=1 prevents background task spawning
  • KillMode=mixed in systemd kills child processes when the service stops
  • The function was already disabled during a previous PoC and had known limitations (couldn't block absolute paths, pkill -f variants)

Test plan

  • All 16 health-check.bats tests pass
  • Verify health check runs correctly via cron after merge

@gemini-code-assist
Copy link

Summary of Changes

Hello @claudio-pi, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request streamlines the health check system by eliminating the orphan process detection mechanism. This removal is justified by architectural changes, such as subagents now running as native Claude Task tools and the use of CLAUDE_CODE_DISABLE_BACKGROUND_TASKS=1, which prevent background task spawning. Additionally, KillMode=mixed in systemd ensures child processes are terminated when the service stops, rendering the previous orphan process killer redundant and improving system efficiency by removing unnecessary checks.

Highlights

  • Orphan Process Detection Removal: The _check_orphan_processes() function, its invocation in the healthy-service code path, and its corresponding test have been entirely removed from the health check system.
  • Documentation Updates: CHANGELOG.md, EXPERIMENTS.md, and README.md have been updated to reflect the removal of the orphan process detection mechanism.
Changelog
  • CHANGELOG.md
    • Removed Orphan process detection from health check — no longer needed; subagents run as native Task tools with CLAUDE_CODE_DISABLE_BACKGROUND_TASKS=1
Activity
  • CISO approved the changes, confirming that compensating controls like KillMode=mixed and the environment variable are sufficient.
  • Tech Writer's feedback was addressed by naming the specific environment variable in EXPERIMENTS.md and adding a CHANGELOG entry.
  • Bash Expert confirmed the clean removal of the code without breaking control flow or leaving dangling references.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 5 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request cleanly removes the orphan process detection functionality, which is no longer needed due to architectural changes. The code removal is straightforward, and the corresponding updates to documentation and tests are accurate. I have one minor suggestion to improve formatting consistency in the newly added EXPERIMENTS.md file. Overall, this is a good simplification of the codebase.

No longer needed: subagents run as native Claude Task tools (not
background processes), CLAUDE_CODE_DISABLE_BACKGROUND_TASKS=1 prevents
background spawning, and KillMode=mixed in systemd kills child
processes when the service stops.
@claudio-pi claudio-pi merged commit abde57a into main Feb 10, 2026
3 checks passed
@claudio-pi claudio-pi deleted the remove-orphan-check branch February 10, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants